package com.aizuda.boot.modules.business.log.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.aizuda.boot.modules.business.log.domain.entity.OperationLogEntity;
import com.aizuda.boot.modules.business.log.domain.request.ExportLogDTO;
import com.aizuda.boot.modules.business.log.domain.request.LogQueryDTO;
import com.aizuda.boot.modules.business.log.domain.request.LogSaveDTO;
import com.aizuda.boot.modules.business.log.domain.response.LogShowDTO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.HashMap;
import java.util.List;

/**
 * @Author sangyirong
 * @ClassName LogService
 * @Version 1.0
 * @Date 2025/6/5 19:38
 */
public interface LogService extends IService<OperationLogEntity> {


    /**
     * 获取日志
     *
     * @param page
     * @param logQueryDTO
     * @return
     */
    IPage<OperationLogEntity> getLogPage(IPage page, LogQueryDTO logQueryDTO);

    /**
     * 获取日志类型
     * @return
     */
    List<HashMap<String, String>> getLogType();

    /**
     * 获取日志（分页查询）
     * @param logQueryDTO
     * @return
     */
    IPage<LogShowDTO> getLogPage(LogQueryDTO logQueryDTO);

    /**
     * 保存日志
     * @param logSaveDTO
     * @return
     */
    void saveLog(LogSaveDTO logSaveDTO);

    /**
     * 导出日志
     * @param exportLogDTO
     * @param response
     */
    void exportLog(ExportLogDTO exportLogDTO, HttpServletResponse response);
}
